package com.lanyou.esb.cook.proxy.exception;

import com.lanyou.esb.cook.proxy.meta.AlarmLevel;
import com.lanyou.esb.cook.proxy.meta.AlarmType;

/**
 * 接口告警异常
 * 
 * @author Davey.wu
 */
public class IfAlarmException extends Exception {
	/****/
	private static final long serialVersionUID = -7315823269720936887L;
	/** 异常码 **/
	private String code;
	/** 告警类型 **/
	private AlarmType type;
	/** 告警等级 **/
	private AlarmLevel level;
	/** 流量 **/
	private int flow;
	/** 流量阀值 **/
	private int flowThreshold;

	public IfAlarmException(String msg, String code, AlarmType type,
			AlarmLevel level, int flow, int flowThreshold) {
		super(msg);
		this.setCode(code);
		this.setType(type);
		this.setLevel(level);
		this.setFlow(flow);
		this.setFlowThreshold(flowThreshold);
	}

	public AlarmLevel getLevel() {
		return level;
	}

	public void setLevel(AlarmLevel level) {
		this.level = level;
	}

	public AlarmType getType() {
		return type;
	}

	public void setType(AlarmType type) {
		this.type = type;
	}

	public int getFlow() {
		return flow;
	}

	public void setFlow(int flow) {
		this.flow = flow;
	}

	public int getFlowThreshold() {
		return flowThreshold;
	}

	public void setFlowThreshold(int flowThreshold) {
		this.flowThreshold = flowThreshold;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
